// RemoveLeftRecursion.h: interface for the RemoveLeftRecursion class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_REMOVELEFTRECURSION_H__C2A0DDD0_DE7D_4A05_BC0C_8B1E6F1DCD87__INCLUDED_)
#define AFX_REMOVELEFTRECURSION_H__C2A0DDD0_DE7D_4A05_BC0C_8B1E6F1DCD87__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ComplierNote.h"
#include "SmallObject.h"

class RemoveLeftRecursion : public SmallObject 
{
public:
	RemoveLeftRecursion();
	virtual ~RemoveLeftRecursion();

public:
	virtual BOOL Interpret() = 0;

	RemoveLeftRecursion* Next(){
		return m_pNext;
	}

	void AAnalyzer(AccidenceAnalyzer* pAAnalyzer){
		ASSERT(pAAnalyzer);
		m_pAAnalyzer = pAAnalyzer;
	}

	AccidenceAnalyzer* AAnalyzer(){
		return m_pAAnalyzer;
	}

	void Next(RemoveLeftRecursion* pNext){
		m_pNext = pNext;
	}

	void Parent(ComplierNote* pParent){
		m_pParent = pParent;
	}

	ComplierNote* Parent() const {
		return m_pParent;
	}

	void EReporter(ErrorReporter* m_pEReporter){
		m_pErrorReporter = m_pEReporter;
	}

	ErrorReporter* EReporter(){
		return m_pErrorReporter;
	}

protected:
	AccidenceAnalyzer* m_pAAnalyzer;
	RemoveLeftRecursion* m_pNext;
	ComplierNote* m_pParent;
	ErrorReporter* m_pErrorReporter;
};

#endif // !defined(AFX_REMOVELEFTRECURSION_H__C2A0DDD0_DE7D_4A05_BC0C_8B1E6F1DCD87__INCLUDED_)
